/* eslint-disable import/first */
import { View } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import "./index.less";
import React from "react";
import PageLayout from "@/layout/PageLayout";
import SearchWrapper from "@/pages/Home/components/SearchWrapper";
import IndexSwiper from "./components/IndexSwiper";
import IndexMenu from "./components/IndexMenu";
import IndexRiskQuery from "./components/IndexRiskQuery";
import IndexBusinessTabs from "./components/IndexBusinessTabs";

const Index: React.FC = () => {
  useLoad(() => {
    console.log("Page loaded");
  });

  return (
    <PageLayout>
      <View className="w-full py-2">
        {/* 搜索 */}
        <View className="w-full mb-2">
          <SearchWrapper />
        </View>
        {/* 轮播 */}
        <View className="w-full mb-4">
          <IndexSwiper />
        </View>
        {/* 主菜单 */}
        <View className="w-full mb-4">
          <IndexMenu />
        </View>
        {/* 风险查询 */}
        <View className="w-full mb-4">
          <IndexRiskQuery />
        </View>
        {/* 业务Tabs */}
        <View className="w-full">
          <IndexBusinessTabs />
        </View>
      </View>
    </PageLayout>
  );
};

export default Index;
